﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orid.Management.Statistics.Tools.Decomposition.Config;
using Orid.Management.Statistics.Tools.Decomposition.Model;


namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class UploadJobStoreOffline:UploadJobStore
    {
         string connectString, tableName;

         public UploadJobStoreOffline()
        {
            connectString = Setting.SettingInstance.DBAddress_Offline;
            //[UploadJobStore]
            tableName = Setting.SettingInstance.UploadJobStore_Offline;
        }

         public override ModelUploadJobStore GetEntryDuration(Guid? jobID, int? accountID)
        {
            try
            {

                if ((jobID == null) ||(accountID == null))
                {
                    return null;
                }

                return GetEntryDuration(jobID, accountID, connectString, tableName);

            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw (new Exception(ex.Message));
            }
        }

         
    }
}
